<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<script>
			var rightpwd = "123";
			var inputpwd = prompt("请您输入您的密码");
			while(rightpwd != inputpwd) {
				alert("您的密码有误");
				inputpwd = prompt("您输入您的密码");
			}
			alert("登录成功!");
		</script>
	</body>

</html>